package chapter9;

import java.io.File;

public class sort1 {
    public static void main(String[] args) {
        // 文件路径名
        String pathname = "D:\\aaa.txt";
        File file1 = new File(pathname);
// 文件路径名
        String pathname2 = "D:\\aaa\\bbb.txt";
        File file2 = new File(pathname2);
// 通过父路径和子路径字符串
        String parent = "d:\\aaa";
        String child = "bbb.txt";
        File file3 = new File(parent, child);
// 通过父级File对象和子路径字符串
        File parentDir = new File("d:\\aaa");
        String child1 = "bbb.txt";
        File file4 = new File(parentDir, child1);
    }
}
